package aid.bomberman.namespaces;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainMenu extends Activity implements OnClickListener {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        Button bGame = (Button)findViewById(R.id.id_play); //game
        bGame.setOnClickListener(this);
        
        Button bRecords = (Button)findViewById(R.id.id_records); //records
        bRecords.setOnClickListener(this);
        
        Button bOptions = (Button)findViewById(R.id.id_options); //options
        bOptions.setOnClickListener(this);
        
        Button bAbout = (Button)findViewById(R.id.id_about); //about
        bAbout.setOnClickListener(this);
        
        Button bExit = (Button)findViewById(R.id.id_exit); //exit
        bExit.setOnClickListener(this);   
        
    }

	public void onClick(View arg0) {
		   switch (arg0.getId())
	        {
	            case R.id.id_play:
	            {
	                Intent intent = new Intent();
	                intent.setClass(this, Game.class);
	                startActivity(intent);
	                break;
	            }
	 
	            case R.id.id_options:
	            {

	                Intent intent = new Intent();
	                intent.setClass(this, Options.class);
	                startActivity(intent);
	                break;
	            }
	            
	            case R.id.id_records:
	            {
	                Intent intent = new Intent();
	                intent.setClass(this, Records.class);
	                startActivity(intent);
	                break;
	            }
	            
	            case R.id.id_about:
	            {
	                Intent intent = new Intent();
	                intent.setClass(this, About.class);
	                startActivity(intent);
	                break;
	            }
	            
	            case R.id.id_exit:
	                finish();
	                break;
	 
	            default:
	                break;
	        }
	}
}